package com.example.library_base.toast

import android.app.Application
import android.widget.Toast
import com.example.library_base.toast.qualifiers.ToastLong
import com.example.library_base.toast.qualifiers.ToastShort
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object ToastModule {

    @Provides
    @ToastShort
    @Singleton
    fun provideToastShort(application: Application): Toast = Toast.makeText(application, "", Toast.LENGTH_SHORT)

    @Provides
    @ToastLong
    @Singleton
    fun provideToastLong(application: Application): Toast = Toast.makeText(application, "", Toast.LENGTH_LONG)
}